package by.bucha.testproject.content.bo.fileExplorer;

public class FileExplorerListItemModel implements
		Comparable<FileExplorerListItemModel> {

	public FileExplorerListItemModel() {
	}

	private String mDirectoryOrFileName;
	private String mTitle;
	private String mDate;
	private String mPath;
	private Boolean mIsFolder;
	private Boolean mIsBack;
	private Boolean mIsImage;

	public FileExplorerListItemModel(String directoryOrFileName, String title,
			String date, String path, Boolean isFolder, Boolean isBack,
			Boolean isImage) {
		mDirectoryOrFileName = directoryOrFileName;
		mTitle = title;
		mDate = date;
		mPath = path;
		mIsFolder = isFolder;
		mIsBack = isBack;
		mIsImage = isImage;
	}

	public Boolean isImage() {
		return mIsImage;
	}

	public String getName() {
		return mDirectoryOrFileName;
	}

	public Boolean isBack() {
		return mIsBack;
	}

	public String getData() {
		return mTitle;
	}

	public String getDate() {
		return mDate;
	}

	public String getPath() {
		return mPath;
	}

	public Boolean isFolder() {
		return mIsFolder;
	}

	@Override
	public int compareTo(FileExplorerListItemModel another) {
		if (this.mDirectoryOrFileName != null) {
			return this.mDirectoryOrFileName.toLowerCase().compareTo(
					another.getName().toLowerCase());
		} else {
			throw new IllegalArgumentException();
		}
	}

}
